package day04;

public class WhileDemo {
    public static void main(String[] args) {
        int num=1;
        while (num<=9){
            System.out.println(num+"*9="+num*9);
            num++;

        }
        /*
        num =1      num<9为ture   输出1*9=9     num++
        num =2      num<9为ture   输出2*9=18    num++
        num =3      num<9为ture   输出3*9=27    num++
        num =4      num<9为ture   输出4*9=36    num++
        num =5      num<9为ture   输出5*9=45    num++
        num =6      num<9为ture   输出6*9=54    num++
        num =7      num<9为ture   输出7*9=63    num++
        num =8      num<9为ture   输出8*9=72    num++
        num =9      num<9为ture   输出9*9=81    num++
        num =10     num<9为false  结束循环
         */
        System.out.println("----------------------");
        int times=0;
        while (times<5){
            System.out.println("行动是成功的阶梯");
            times++;
        }
        System.out.println("-----------------");
    }
}
